import request from '@/utils/request'

// 查询订单列表
export function listOrders(query) {
  return request({
    url: '/merchant/order/list',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getOrder(orderNo) {
  return request({
    url: `/merchant/order/${orderNo}`,
    method: 'get'
  })
}

// 获取订单统计数据
export function getOrderStats() {
  return request({
    url: '/merchant/order/stats',
    method: 'get'
  })
}

// 订单发货
export function deliveryOrder(data) {
  return request({
    url: '/merchant/order/delivery',
    method: 'post',
    data: data
  })
}

// 取消订单
export function cancelOrder(data) {
  return request({
    url: '/merchant/order/cancel',
    method: 'post',
    data: data
  })
}

// 修改订单备注
export function updateOrderRemark(data) {
  return request({
    url: '/merchant/order/remark',
    method: 'post',
    data: data
  })
} 